<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page import="com.siloam.module.User" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="../../jeasyui/themes/gray/easyui.css" />
<link rel="stylesheet" type="text/css" href="../../jeasyui/themes/icon.css" />
<link rel="stylesheet" type="text/css" href="../../css/manager.css" />

<script type="text/javascript" src="../../jeasyui/jquery-1.8.0.min.js"></script>
<script type="text/javascript" src="../../jeasyui/jquery.easyui.min.js"></script>
<script type="text/javascript" src="../../jeasyui/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="../../js/win.js"></script>
<title>角色管理</title>
<script type="text/javascript">

	function addRole(){
		openUrl("新增角色", 400, 300, "addRole.jsp");
	}

	function editRole(){
		selectOneOpenUrl("#dg","role.do?method=initEdit", 400, 300, "修改", "角色");
	}

	function deleteRole(){
		checkSelectSomeDoAction("#dg", "删除", "角色", "role.do?method=delete", true);
	}

	function roleNavs(){
		openUrl("角色的导航", 300, 400, "roleNavs.jsp");
	}
	
	function reloadDg(){
		$("#dg").datagrid("reload");
		closeWin();
	}
	
</script>
</head>
<body>
<div class="dg-content">
		<table id="dg" class="easyui-datagrid" title="角色列表"
			data-options="rownumbers:true,
				fitColumns:true,iconCls:'icon-users',url:'role.do?method=listRoles'">
			<thead>
				<tr>
					<th data-options="field:'ck',checkbox:true"></th>
					<th data-options="field:'id',hidden:true"></th>
					<th data-options="field:'name',width:100,align:'center'">名称</th>
					<th data-options="field:'scope',width:80,align:'center'">范围</th>
					<th data-options="field:'remark',width:60,align:'center'">备注</th>
					<th data-options="field:'opt',width:60,align:'center'">操作</th>
				</tr>
			</thead>
		</table>
	</div>
	<div class="dg-foot">
		<div class='dg-toolbar'>
			<a href="#" class="easyui-linkbutton" iconCls="icon-add" plain="true" onclick="addRole()">新增</a>
			<a href="#" class="easyui-linkbutton" iconCls="icon-edit" plain="true" onclick="editRole()">修改</a>
			<a href="#" class="easyui-linkbutton" iconCls="icon-remove" plain="true" onclick="deleteRole()">删除</a>
		</div>
	</div>
</body>
</html>